﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace MyBehaviorTree
{
    public class ActiveSelector : Selector
    {
        public override State update()
        {
            var prev = index;
            base.start();
            State state = base.update();
            if (prev != children.Count && index != prev)
                children[prev].abort();
            return state;
        }
    }
}